<template>
	<view>
		<rticlea-list ref="rticleaRef"></rticlea-list>
	</view>
</template>

<script>
	import rticleaList from '../../components/rticleaList.vue'
	export default {
		components: {
			rticleaList,
		},
		data() {
			return {
				swiperList: [],
				recommendListData: [],
				hotrecommendListData:[],
				scrollTop: 0
			}
		},
		onLoad() {
			this.getSwiperList()
			this.getRecommendList()
			this.getHotRecommendList()
		},
		methods: {
			getSwiperList() {
				this.$api.getSwiperList().then(res => {
					if (res.code) {
						this.swiperList=res.data
					}
				})
			},
			getRecommendList(){
				this.$api.getRecommendList().then(res=>{
					if(res.code){
						this.recommendListData=res.data
					}
				})
			},
			getHotRecommendList(){
				this.$api.getHotRecommendList().then(res=>{
					if(res.code){
						this.hotrecommendListData=res.data
					}
				})
			}
		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop
		},
		onReachBottom() {
			this.$refs.rticleaRef.getRticleabyType()
		}
	}
</script>

<style lang="scss">
	.weekPlan {
		.header {
			background-color: #FFFFFF;
			padding: 20upx 0upx;
		}

		.tui-content {
			width: 100%;
			display: flex;
			flex-wrap: wrap;

			.tui-upload-add {
				font-size: 68rpx;
				font-weight: 100;
				color: #888;
				background-color: #F7F7F7;
				display: flex;
				align-items: center;
				justify-content: center;
				padding: 0;

				.tui-icon {
					font-size: 44upx;
				}
			}

			.tui-image-item {
				width: 180rpx;
				height: 180rpx;
				position: relative;
				margin-right: 20rpx;
				margin-bottom: 20rpx;
				margin-top: 20rpx;
				margin-left: 20rpx;
				overflow: hidden;
			}

			.tui-image-item:nth-of-type(3n) {
				margin-right: 0;
			}
		}

		.NumberBoth {
			background-color: #FFFFFF;
			display: flex;
			justify-content: space-between;
			align-items: center;
			height: 100upx;
			margin-top: 30rpx;
			padding: 0upx 30upx;
		}
	}
</style>
